#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
using namespace std;
#define L long
#define LL L L
#define I inline
#define R register
I LL read()
{
	R char c;R bool f;R LL x;
	for(f=0;(c=getchar())<'0'||c>'9';f=(c=='-'));
	for(x=c-'0';(c=getchar())>='0'&&c<='9';x=(x<<3)+(x<<1)+c-'0');
	return f?-x:x;
}
int num[4];
int zidian[4]={0,2,3,1};
char names[4][100]={
	"Competition department",
	"Propaganda Department",
	"Office",
	"Organization Department",
};
#define max(x,y) ((x>y)?x:y)

int main()
{
//	freopen("7-2.in","r",stdin);
	for(char c;(c=getchar())!=EOF;)
		if(c>='A'&&c<='D')
			++num[c-'A'];
	for(int i=0;i<4;++i)
	{
		int maxx=-1; 
		for(int j=0;j<4;++j)
			maxx=max(num[j],maxx);
		for(int j=0;j<4;++j)
			if(num[zidian[j]]==maxx)
			{
				printf("%s %d people!\n",names[zidian[j]],num[zidian[j]]);
				num[zidian[j]]=-1;
				break;
			}
	
	}


	return 0;
}
